<?php defined('IN_IA') or exit('Access Denied');?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no, email=no" />
    <title>供灯榜</title>
    <script type="text/javascript" src="<?php echo MODULE_URL;?>public/deng/js/flexible.js"></script>
    <script type="text/javascript" src="<?php echo MODULE_URL;?>public/deng/js/pageLoading.js"></script>
    <link rel="stylesheet" type="text/css" href="<?php echo MODULE_URL;?>public/deng/css/gdb.css" />
</head>
<body>
<h2>已连续供灯 <span>1</span> 天</h2>
<h1><span>Tina</span>，您尚未上榜</h1>
<div class="box">
    <ul class="list">
        <?php  if(is_array($list)) { foreach($list as $v) { ?>
        <li>随喜赞叹<span><?php  echo $v['name'];?></span>登上供灯榜</li>   
        <?php  } } ?>    
    </ul>
</div>
<div class="btn">
    <button class="left"></button>
    <button class="right"><a href="<?php  echo $this->createMobileUrl('gongdengjilu')?>"></a></button>
</div>
<div class="ad">
    <div class="title">
        <h3>榜单规则</h3>
        <p>师兄吉祥，随喜您参与“供灯榜”活动。</p>
        <p>规则：连续供灯7天即可登上供灯榜，【善知识联盟】义工师兄将不定期举行线下供灯活动，活动真实不虚！</p>
        <p>请坚持每日供灯，若供灯修行期间间断一日，您将会从供灯榜自动退出，还需重新开始供灯。</p>
    </div>
    <h4>好</h4>
</div>
<div id="mask"></div>
 <?php (!empty($this) && $this instanceof WeModuleSite) ? (include $this->template('baifocommon/nav', TEMPLATE_INCLUDEPATH)) : (include template('baifocommon/nav', TEMPLATE_INCLUDEPATH));?>
<script type="text/javascript" src="<?php echo MODULE_URL;?>public/deng/js/zepto.min.js"></script>
<script type="text/javascript">
    //弹框
    $('.left').click(function(event) {
        $("#mask").show();
        $('.ad').css('display','block');
    });
    //取消规则弹框
    $('h4').click(function(event) {
        $("#mask").hide();
        $(this).parent().css('display','none');
    });
    //文字上轮播
    var ht= $('.list').html() + $('.list').html();//克隆本身
    $('.list').html(ht);
    var number=0;
    function scrollup(){
        if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
            number = number-3;
        }else{
            number--;
        }
        $('.list').css('transform','translateY('+number+'px)')
        $('.list').css('-webkit-transform','translateY('+number+'px)')
        if(number<=-$('.list').height()/2){
            number=0;
        }
    }
    setInterval(scrollup,40);

    $(".nav>li").on('tap', function(e){
        e.stopPropagation();
        var index = $(this).index();
        $(this).addClass('on').siblings().removeClass('on');

    });
    $(".dropA").on('tap',function(){
        if (!$('.dropdown').hasClass('downOn')) {
            $('.dropdown').addClass('downOn');
        }else{
            $('.dropdown').removeClass('downOn');
        }
    })
    $(document).on('tap', function(e){
        var obj = e.target;
        if (!$(obj).is('.dropdown, .dropdown *')) {
            $('.dropdown').removeClass('downOn');
        }
    });
</script>
</body>
</html>